﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Touch1.aspx.cs" Inherits="Touchscreen.test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="App_Themes/Stylesheet1.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<div class="FullScreen">
    <div class="Explain">
        <asp:Label ID="Explain" runat="server" Text="Selecteer een film" CssClass="ExplainText"></asp:Label>
    </div>
<% 
Touchscreen.FilmManager filmManager = new Touchscreen.FilmManager();
List<Touchscreen.Film> films;
films = filmManager.GetUpComingFlims();
int count = 0;
foreach (Touchscreen.Film f in films)
{
    if (count < 5)
    {
        LabelTitle.Text = f.title;
        LabelTime.Text = "Aanvangstijd: " + f.startTime.ToShortTimeString();
        LabelRoom.Text = "Zaal: " + f.room.ToString();
        ImagePreview.ImageUrl = ImageFolder + f.image;
        LabelLanguage.Text = "Taal: ";
        ImageLanguage.ImageUrl = FlagsFolder + f.language + ".gif";
        ImageButtonTransparent.PostBackUrl = "Touch2.aspx?FilmName=" + f.title + 
            "&Adult=0&Child=0&OldPeople=0&Student=0&3D=0"; 
            
             
        if (f.dried == false)
        {
            ImageParentGuide.Visible = false;
        }
        else
        {
            ImageParentGuide.Visible = true;
        }  
%>
    <div class="FilmChoice">
        <div class="FilmTitle">
            <asp:Label ID="LabelTitle" CssClass="FilmTilteText" runat="server" Text="Title"></asp:Label>
        </div>
        <div class="FilmTimeAndPlace">
            <asp:Label ID="LabelTime" CssClass="FloatLeft" runat="server" Text="Start tijd: tijd"></asp:Label>
            <asp:Label ID="LabelRoom" CssClass="FloatRight" runat="server" Text="Zaal: x"></asp:Label>
        </div>
        <div class="FilmPreviewImage">
            <asp:Image ID="ImagePreview" runat="server" 
                ImageUrl="~/App_Themes/Images/blackswan3.jpg" Height="100%" 
                Width="100%" />
        </div>
        <div class="FilmLanguage">
            <asp:Label ID="LabelLanguage" CssClass="FloatLeft" runat="server" Text="Taal:"></asp:Label>
            <asp:Image ID="ImageLanguage" runat="server" 
                ImageUrl="~/App_Themes/Images/Flags/EN.gif" CssClass="Flag" />
        </div>
        <div class="FilmParentGuide">
            <asp:Image ID="ImageParentGuide" runat="server" Height="24px" 
                ImageUrl="~/App_Themes/Images/3d.png" Width="24px" />
        </div>


    </div>
    <div class="FilmClickHandler">
        <asp:ImageButton ID="ImageButtonTransparent" runat="server" 
            ImageUrl="~/App_Themes/Images/transparent.png" Height="100%" Width="100%" 
            PostBackUrl="?FilmID="/>
    </div>

    <% }
    count++;
} %>
<div class="ButtonNextPrevious">
    <asp:Button ID="FilmNow" CssClass="ButtonLaterNext" runat="server" Text="Films nu" Visible="false" />
    <asp:Button ID="FilmLater" CssClass="ButtonLaterNext" runat="server" Text="Films later op de dag" />
</div>
    
</div>
</form>
</body>
</html>
